package gm.server.virtual.simulator2D;

import gm.server.Server;
import java.awt.BorderLayout;

/**
 * Szimuláció ablaka.
 *
 * @author imruf84
 */
public class SimulatorMainFrame extends javax.swing.JFrame {

    /**
     * Jelenet tárolója.
     */
    private final ScenePanel scenePanel;

    /**
     * Creates new form MainFrame
     *
     * @param server szerver
     */
    public SimulatorMainFrame(final Server server) {
        initComponents();
        scenePanel = new ScenePanel(server);
        add(scenePanel, BorderLayout.CENTER);
        setTitle("Gobelin Simulator v0.1");
        setSize(800, 600);
        setLocationRelativeTo(null);
        scenePanel.updateTipPanel();
    }

    /**
     * Jelenet tárolójának a lekérdezése.
     *
     * @return jelenet tárolója
     */
    public ScenePanel getScenePanel() {
        return scenePanel;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables
}
